﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:SoftTeach.Resources.Controls">

  <Style x:Key="ColumnHeaderPrintStyle" TargetType="DataGridColumnHeader">
    <Setter Property="BorderBrush" Value="Black"/>
    <Setter Property="BorderThickness" Value="0,0,1,1"/>
    <Setter Property="Background" Value="White"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="Padding" Value="5,3,5,3"/>
  </Style>

  <Style x:Key="NotenColumnHeaderPrintStyle" TargetType="DataGridColumnHeader">
    <Setter Property="Control.FontFamily" Value="Calibri" />
    <Setter Property="Control.FontSize" Value="14pt" />
    <Setter Property="Control.FontWeight" Value="Bold" />
    <Setter Property="Background" Value="White"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="BorderBrush" Value="Black"/>
    <Setter Property="BorderThickness" Value="1,1,1,1"/>
  </Style>

  <Style x:Key="DatagridMultilineElementStyle" TargetType="TextBlock">
    <Setter Property="TextWrapping" Value="Wrap" />
  </Style>
  <Style x:Key="DatagridMultilineEditingElementStyle" TargetType="TextBox">
    <Setter Property="TextWrapping" Value="Wrap" />
    <Setter Property="AcceptsReturn" Value="true" />
  </Style>

  <Style x:Key="DatagridComboBoxElementStyle" TargetType="ComboBox" BasedOn="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
  </Style>

  <Style x:Key="CellPrintStyle" TargetType="DataGridCell">
    <Setter Property="Control.FontFamily" Value="Calibri" />
    <Setter Property="Control.FontSize" Value="12pt" />
    <Setter Property="Background" Value="White"/>
    <Setter Property="Foreground" Value="Black" />
    <Style.Triggers>
      <Trigger Property="IsSelected" Value="True">
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="BorderBrush" Value="{x:Null}" />
      </Trigger>
    </Style.Triggers>
  </Style>

  <Style x:Key="CenteredCellPrintStyle" TargetType="DataGridCell" BasedOn="{StaticResource CellPrintStyle}">
    <Setter Property="TextBlock.TextAlignment" Value="Center"/>
  </Style>

  <Style TargetType="{x:Type DataGrid}" x:Key="DatagridPrintStyle">
    <Setter Property="BorderThickness" Value="1,1,0,0" />
    <Setter Property="BorderBrush" Value="Black"/>
    <Setter Property="HorizontalGridLinesBrush" Value="Black" />
    <Setter Property="VerticalGridLinesBrush" Value="Black" />
    <Setter Property="ColumnHeaderStyle" Value="{StaticResource ColumnHeaderPrintStyle}"/>
    <Setter Property="HeadersVisibility" Value="None"/>
    <Setter Property="CellStyle" Value="{StaticResource CellPrintStyle}"/>
    <Setter Property="CanUserAddRows" Value="False"/>
    <Setter Property="CanUserDeleteRows" Value="False"/>
    <Setter Property="IsReadOnly" Value="True"/>
    <Setter Property="IsEnabled" Value="False"/>
  </Style>

  <Style TargetType="{x:Type DataGrid}">
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="BorderBrush" Value="#FF333333" />
    <!--<Setter Property="CanUserAddRows" Value="True"/>-->
    <Setter Property="SelectionMode" Value="Single" />
    <Setter Property="HorizontalGridLinesBrush" Value="DarkGray" />
    <Setter Property="VerticalGridLinesBrush" Value="LightGray" />
    <!--<Setter Property="AlternatingRowBackground" Value="#FFEDEDED" />-->
  </Style>
  
  <Style TargetType="{x:Type controls:SDataGrid}">
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="BorderBrush" Value="#FF333333" />
    <!--<Setter Property="CanUserAddRows" Value="True"/>-->
    <Setter Property="SelectionMode" Value="Single" />
    <Setter Property="HorizontalGridLinesBrush" Value="DarkGray" />
    <Setter Property="VerticalGridLinesBrush" Value="LightGray" />
    <!--<Setter Property="AlternatingRowBackground" Value="#FFEDEDED" />-->
  </Style>

  <Style TargetType="{x:Type TextBox}" x:Key="HeaderTextBox">
    <Setter Property="Control.FontFamily" Value="Segoe Black" />
    <Setter Property="Control.FontSize" Value="16pt" />
    <Setter Property="TextBox.Background">
      <Setter.Value>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
          <GradientStop Color="White" Offset="0.664" />
          <GradientStop Color="#FFF8F8F8" Offset="0" />
        </LinearGradientBrush>
      </Setter.Value>
    </Setter>

  </Style>
</ResourceDictionary>